import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/login/login.vue'
import User from '@/views/user/user.vue'
import Home from '@/views/home/home.vue'
import ShopList from '@/views/shopList/index.vue'
import Comment from '@/views/comment/index.vue'
import ShopTypeList from '@/views/shopType/list/index.vue'
import ShopTypeAdd from '@/views/shopType/add/index.vue'
import ShopTypeEdit from '@/views/shopType/edit/index.vue'

Vue.use(Router)

let routes = [
  {
    path: '/',
    component: Login,
    name: '登录',
    hidden: true,
  },
  {
    path:'/home',
    component: Home,
    name: '主页',
    meta:{
      auth:true
    },
    children: [
    {
        path:'/user',
        component: User,
        name: '用户管理'
    },
    {
      path:'/ShopList',
      component: ShopList,
      name: '商品列表'
    },
    {
      path:'/CommentList',
      component: Comment,
      name: '评论/回复管理'
    },
    {
      path:'/ShopType/list',
      component: ShopTypeList,
      name: '商品品类管理' 
    },
    {
      path:'/ShopType/add',
      component: ShopTypeAdd,
      name: '商品品类增加',
      hidden: true, 
    },
    {
      path:'/ShopType/edit',
      component: ShopTypeEdit,
      name: '商品品类编辑',
      hidden: true, 
    }
   ]
  }
];


export default new Router({
	routes,
});

